TEMPLATE = app
QT = gui core testlib
CONFIG -= debug
CONFIG -= DebugBuild
CONFIG -= warn_on
CONFIG -= Debug
CONFIG -= debug_and_release
CONFIG -= console
CONFIG -= debug_and_release_target
CONFIG -= rtti
CONFIG += qt \
 warn_off \
 release
DESTDIR = bin
OBJECTS_DIR = build
OBJECTS += build/haffman_main.o build/support_func.o
MOC_DIR = build
UI_DIR = build
FORMS = ui/CMainDialog.ui
HEADERS = src/CMainDialogImpl.h assembler_module/haffman_main.h
INCLUDEPATH += ;assembler_module/;
SOURCES = src/CMainDialogImpl.cpp src/main.cpp
RESOURCES += res/resource.qrc
distclean.depends += dir_clean
dir_clean.commands = -$(DEL_DIR) bin build
QMAKE_EXTRA_TARGETS += distclean dir_clean
QMAKE_CXXFLAGS += -s
QMAKE_CFLAGS += -s
QMAKE_LFLAGS += -s

linux-g++ {
	system(mkdir -p bin build)
	system(make -C assembler_module release_linux)
	QMAKE_CLEAN += bin/* build/*
	QMAKE_DISTCLEAN += assembler_module/config.asm
}

win32 {
	system(mkdir bin build)
	system(make -C assembler_module release_windows)
	CONFIG += windows
	QMAKE_LFLAGS_CONSOLE =
	QMAKE_CLEAN += /Q bin\ build\
	QMAKE_DISTCLEAN += assembler_module\config.asm
}

